<?php

namespace App\Http\Controllers;

use DB;
use Storage;
use Session;
use Illuminate\Http\Request;
use Laravel\Lumen\Routing\Controller;


class MusicController extends BaseController
{
	/**
     * @api {get} /music GetMusic
     *
     * @apiVersion 0.1.0
	 *
     * @apiName GetInvitation
 	 *
     * @apiGroup invitation
	 *
     * @apiPermission app
 	 *
     *
 	 *
     * @apiDescription 获取所有喜帖
	 *
     *
 	 *
     * @apiSuccess {Boolean} error 是否错误.
 	 *
     * @apiSuccess {Object} result 音乐数据.
 	 *
     * @apiSuccess {String} name 歌名.
 	 *
     * @apiSuccess {Number} singer 歌手.
 	 *
     * @apiSuccess {String} dir 歌曲地址.
 	 *
 	 *
     * @apiError paramError 参数错误.
 	 *
     * @apiSampleRequest http://192.168.1.120:82/api/team
 	 *
     */

	public function index()
	{
		$result = DB::table("music")
          ->select("name","singer","id","dir")
          ->where("is_delete",0)
          ->get();
          return $this->jsonResponse(false,$result);
          
	}

	public function show($id)
	{
		# code...
	}

	public function store()
	{
		# code...
	}

	public function update($id)
	{
		# code...
	}

	public function destory($id)
	{
		# code...
	}
}